package ABC.Z314;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;

public class Zhongwen {
    public static void main(String[] args) {
        Map a = new HashMap();
        a.put("你", "ni");
        a.put("我", "wo");
        a.put("他", "ta");
        a.put("明天", "mingtian");
        a.put("后天", "houtian");
        Scanner in = new Scanner(System.in);
        System.out.println("请选择输入语种1.中文 2，英文");
        int num = in.nextInt();
        while (true) {
            if (num==1||num==2) {
                break;
            }
            System.out.println("请重新输入");
            num = in.nextInt();
        }
        switch (num) {
            case 1:
                System.out.println("请输入中文");
                a.get(in.next());
                break;
            default:
                System.out.println("请输入英文");
                String english=in.next();
                Set set=a.keySet();
                for(Object o:set){
                    String value=(String) a.get(o);
                    if (value.indexOf(english)>=0){
                        System.out.println(o);
                    }
                }

        }
    }

}
